package cn.spring.com.eleven;

import cn.spring.com.eleven.service.UserService;
import cn.spring.com.spring.ElevenApplicationContext;

public class Test {

    public static void main(String[] args) {
        // 传一个Spring容器的配置文件
        ElevenApplicationContext applicationContext = new ElevenApplicationContext(AppConfig.class);
        // 获取Bean对象
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("userService"));
//        System.out.println(applicationContext.getBean("userService"));
        Object userService =  applicationContext.getBean("userService");
        Object userService =  applicationContext.getBean("userService");
        Object userService =  applicationContext.getBean("userService");

//        userService.test1();
    }
}
